var status = -1;
var selectionLog = [];

function start() {
    action(1, 0, 0)
}

function action(d, c, b) {
    if (status == 0 && d == 0) {
        cm.dispose();
        return
    }(d == 1) ? status++ : status--;
    selectionLog[status] = b;
    var a = -1;
    if (status <= a++) {
        cm.dispose()
    } else {
        if (status === a++) {
            if (!cm.haveItem(4034866)) {
                cm.playerMessage(-1, "汽车门锁上了。");
                cm.dispose();
                return
            }
            cm.sendNormalTalk_Bottom("#face0#哦，汽车门开了。我们打开抽屉瞧瞧吧？", 37, 9111005, false, true);
            cm.gainItem(4034866, -1)
        } else {
            if (status === a++) {
                cm.playerMessage(-1, "获得了钥匙。");
                cm.sendNormalTalk_Bottom("#face0#这个应该是门钥匙！走，我们快逃出去。", 37, 9111005, true, true);
                cm.gainItem(4034867, 1)
            } else {
                if (status === a++) {
                    cm.forceCompleteQuest(58812);
                    cm.gainItem(4034867, -1);
                    cm.dispose();
                    cm.warp(800021119, 0, false)
                }
            }
        }
    }
};